package world.snowcrystal.commons.model.vo;


import lombok.Data;
import world.snowcrystal.commons.model.entity.InterfaceInvokeAnalysis;

import java.io.Serial;
import java.io.Serializable;

@Data
public class InterfaceTotalInvokeCountVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    private Long interfaceId;
    private String interfaceName;
    private Long totalInvokeCount;


    public static InterfaceTotalInvokeCountVO fromEntity(InterfaceInvokeAnalysis entity) {
        InterfaceTotalInvokeCountVO vo = new InterfaceTotalInvokeCountVO();
        vo.setInterfaceId(entity.getInterfaceId());
        vo.setInterfaceName(entity.getName());
        vo.setTotalInvokeCount(entity.getTotalInvokeCount());
        return vo;
    }

}
